﻿using System;
using System.Collections.Generic;
using System.Text;
using libCommonClass;
using libReadWrite;

namespace TTServer.Messages
{
    public class MouseMoveMessage : TTMessage
    {
        private String _temporaryKey = "";

        public String TemporaryKey
        {
            get { return _temporaryKey; }
            set { _temporaryKey = value; }
        }

        private int _dx;

        public int DX
        {
            get { return _dx; }
            set { _dx = value; }
        }

        private int _dy;

        public int DY
        {
            get { return _dy; }
            set { _dy = value; }
        }

        public MouseMoveMessage()
        {

        }

        public override void ReadMessage(BigEndianReader sr)
        {
            this.TemporaryKey = sr.ReadString();

            this._dx = sr.ReadInt16();

            this._dy = sr.ReadInt16();
        }

        public override void WriteMessage(BigEndianWriter sw)
        {
            throw new NotImplementedException();
        }

        public override TTMessage Clone()
        {
            return (new MouseMoveMessage());
        }

        public override int GetMessageID()
        {
            return MessageKind.MOUSE_MOVE;
        }

        public override string GetMessageName()
        {
            return "MouseMoveMessage";
        }
    }
}
